package com.yfbao.horizon.schedule.tk.conf;

import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * Author song.xl
 * Date 2021/8/18
 * Description
 */
@Slf4j
public class CtpRedisTemplate<K, V> extends RedisTemplate<K, V> {

    @SneakyThrows
    @Override
    public <T> T execute(RedisCallback<T> action, boolean exposeConnection, boolean pipeline) {
        try {
            T t = super.execute(action, exposeConnection, pipeline);

            logger.info("test redis command");
            return t;
        } catch (Exception e) {
            throw e;
        } finally {
        }
    }
}
